package com.yxw.springmvc.userBehavior.controller;

import com.yxw.springmvc.userBehavior.model.UserRole;
import com.yxw.springmvc.userBehavior.request.UserRoleAddRequest;
import com.yxw.springmvc.userBehavior.service.UserRoleManageService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

/**
 * Created by hp on 2016/9/27.
 */
@Controller
@RequestMapping("/userRole")
public class UserRoleManageController {

    @Resource
    private UserRoleManageService userRoleManageService;

    @RequestMapping("/add")
    @ResponseBody
    public UserRole add (UserRoleAddRequest request){
        UserRole role = userRoleManageService.add(request);
        return role;
    }
}
